Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rfxcom] Add ability to properly receive configured command ids, deprecate hard-coded guesses #10940

Merged
merged 1 commit into from
Jul 18, 2021

Conversation

Jamstah
Copy link
Contributor

@Jamstah Jamstah commented Jul 5, 2021

Currently, when a message is received the command will be determined only from the hard-coded set of ON/OFF commands, which means if I configure a thing and attach it to a switch there is no guarantee that it will respond as expected to receive commands.

The hard-coded ON/OFF commands are based on experimentation with different devices, and are not at all consistent. This commit also deprecates the use of those so that in a future release, Lighting4 devices will only work when configured with the correct command ids up front. This will resolve inconsistent behaviour where devices that have been discovered may work correctly, work only for ON or OFF but not both, have ON and OFF the wrong way around, turn ON one physical device and OFF another, or any combination of those possibilities.

Signed-off-by: James Hewitt [email protected]

@Jamstah Jamstah marked this pull request as draft July 5, 2021 12:52
@Jamstah
Copy link
Contributor Author

Jamstah commented Jul 5, 2021

Making draft for now, forgot to clean up how messages are matched to things.

@Jamstah Jamstah force-pushed the rfxcom-lighting4-rx branch 2 times, most recently from 800bb0d to 753361d Compare July 6, 2021 09:44
@Jamstah Jamstah force-pushed the rfxcom-lighting4-rx branch 2 times, most recently from 6d62821 to a120701 Compare July 12, 2021 17:54
…ecated hard-coded guesses.

Currently, when a message is received the command will be determined only from the hard-coded set of ON/OFF commands, which means if I configure
a thing and attach it to a switch there is no guarantee that it will respond as expected to receive commands. This PR changes the message factory
to require either bytes (from the RFXcom device) or all the details required to make a transmissable message, including the confguration of the
associated Thing. At the moment, this is only used by lighting4 and raw types, but I expect it will be useful for others in the future.

The hard-coded ON/OFF commands in lighting4 are based on experimentation with different devices, and are not at all consistent. This PR deprecates the
use of those so that in a future release, Lighting4 devices will only work when configured with the correct command ids up front. This will resolve
inconsistent behaviour where devices that have been discovered may work correctly, work only for ON or OFF but not both, have ON and OFF the wrong
way around, turn ON one physical device and OFF another, or any combination of those possibilities.

Signed-off-by: James Hewitt <[email protected]>
@Jamstah Jamstah force-pushed the rfxcom-lighting4-rx branch from a120701 to e3de13b Compare July 12, 2021 17:57
@Jamstah Jamstah marked this pull request as ready for review July 12, 2021 17:57
@Jamstah
Copy link
Contributor Author

Jamstah commented Jul 12, 2021

Glad I set to draft, because this wasn't setting the pulse and was crashing the hardware. Now fixed and some extra tests added.

This is now ready for review.

Once (if) this goes in, I'll add a suitable note to https://github.com/openhab/openhab-distro/blob/main/distributions/openhab/src/main/resources/bin/update.lst.

@Skinah Skinah added the bug An unexpected problem or unintended behavior of an add-on label Jul 13, 2021
@kaikreuzer kaikreuzer requested a review from martinvw July 18, 2021 07:22
@martinvw martinvw merged commit 487dc0e into openhab:main Jul 18, 2021
@martinvw martinvw added this to the 3.2 milestone Jul 18, 2021
@martinvw
Copy link
Member

@Jamstah should this be marked as a bug or enhancement?

@Jamstah
Copy link
Contributor Author

Jamstah commented Jul 18, 2021

Marked where?

I'd say enhancement

@Jamstah Jamstah deleted the rfxcom-lighting4-rx branch July 18, 2021 20:36
@Jamstah Jamstah added enhancement An enhancement or new feature for an existing add-on and removed bug An unexpected problem or unintended behavior of an add-on labels Jul 18, 2021
Jamstah added a commit to Jamstah/openhab-distro that referenced this pull request Jul 19, 2021
dw-8 pushed a commit to dw-8/openhab-addons that referenced this pull request Jul 23, 2021
…ecated hard-coded guesses. (openhab#10940)

Currently, when a message is received the command will be determined only from the hard-coded set of ON/OFF commands, which means if I configure
a thing and attach it to a switch there is no guarantee that it will respond as expected to receive commands. This PR changes the message factory
to require either bytes (from the RFXcom device) or all the details required to make a transmissable message, including the confguration of the
associated Thing. At the moment, this is only used by lighting4 and raw types, but I expect it will be useful for others in the future.

The hard-coded ON/OFF commands in lighting4 are based on experimentation with different devices, and are not at all consistent. This PR deprecates the
use of those so that in a future release, Lighting4 devices will only work when configured with the correct command ids up front. This will resolve
inconsistent behaviour where devices that have been discovered may work correctly, work only for ON or OFF but not both, have ON and OFF the wrong
way around, turn ON one physical device and OFF another, or any combination of those possibilities.

Signed-off-by: James Hewitt <[email protected]>
Signed-off-by: dw-8 <[email protected]>
dw-8 pushed a commit to dw-8/openhab-addons that referenced this pull request Jul 25, 2021
…ecated hard-coded guesses. (openhab#10940)

Currently, when a message is received the command will be determined only from the hard-coded set of ON/OFF commands, which means if I configure
a thing and attach it to a switch there is no guarantee that it will respond as expected to receive commands. This PR changes the message factory
to require either bytes (from the RFXcom device) or all the details required to make a transmissable message, including the confguration of the
associated Thing. At the moment, this is only used by lighting4 and raw types, but I expect it will be useful for others in the future.

The hard-coded ON/OFF commands in lighting4 are based on experimentation with different devices, and are not at all consistent. This PR deprecates the
use of those so that in a future release, Lighting4 devices will only work when configured with the correct command ids up front. This will resolve
inconsistent behaviour where devices that have been discovered may work correctly, work only for ON or OFF but not both, have ON and OFF the wrong
way around, turn ON one physical device and OFF another, or any combination of those possibilities.

Signed-off-by: James Hewitt <[email protected]>
Signed-off-by: dw-8 <[email protected]>
dw-8 added a commit to dw-8/openhab-addons that referenced this pull request Jul 25, 2021
…ds, deprecated hard-coded guesses. (openhab#10940)"

This reverts commit 8352f7a.
dw-8 pushed a commit to dw-8/openhab-addons that referenced this pull request Jul 25, 2021
…ecated hard-coded guesses. (openhab#10940)

Currently, when a message is received the command will be determined only from the hard-coded set of ON/OFF commands, which means if I configure
a thing and attach it to a switch there is no guarantee that it will respond as expected to receive commands. This PR changes the message factory
to require either bytes (from the RFXcom device) or all the details required to make a transmissable message, including the confguration of the
associated Thing. At the moment, this is only used by lighting4 and raw types, but I expect it will be useful for others in the future.

The hard-coded ON/OFF commands in lighting4 are based on experimentation with different devices, and are not at all consistent. This PR deprecates the
use of those so that in a future release, Lighting4 devices will only work when configured with the correct command ids up front. This will resolve
inconsistent behaviour where devices that have been discovered may work correctly, work only for ON or OFF but not both, have ON and OFF the wrong
way around, turn ON one physical device and OFF another, or any combination of those possibilities.

Signed-off-by: James Hewitt <[email protected]>
Signed-off-by: dw-8 <[email protected]>
dw-8 added a commit to dw-8/openhab-addons that referenced this pull request Jul 25, 2021
…ds, deprecated hard-coded guesses. (openhab#10940)"

This reverts commit 8352f7a.

Signed-off-by: dw-8 <[email protected]>
martinvw pushed a commit to openhab/openhab-distro that referenced this pull request Aug 23, 2021
dschoepel pushed a commit to dschoepel/openhab-addons that referenced this pull request Oct 7, 2021
…ecated hard-coded guesses. (openhab#10940)

Currently, when a message is received the command will be determined only from the hard-coded set of ON/OFF commands, which means if I configure
a thing and attach it to a switch there is no guarantee that it will respond as expected to receive commands. This PR changes the message factory
to require either bytes (from the RFXcom device) or all the details required to make a transmissable message, including the confguration of the
associated Thing. At the moment, this is only used by lighting4 and raw types, but I expect it will be useful for others in the future.

The hard-coded ON/OFF commands in lighting4 are based on experimentation with different devices, and are not at all consistent. This PR deprecates the
use of those so that in a future release, Lighting4 devices will only work when configured with the correct command ids up front. This will resolve
inconsistent behaviour where devices that have been discovered may work correctly, work only for ON or OFF but not both, have ON and OFF the wrong
way around, turn ON one physical device and OFF another, or any combination of those possibilities.

Signed-off-by: James Hewitt <[email protected]>
Signed-off-by: Dave J Schoepel <[email protected]>
frederictobiasc pushed a commit to frederictobiasc/openhab-addons that referenced this pull request Oct 26, 2021
…ecated hard-coded guesses. (openhab#10940)

Currently, when a message is received the command will be determined only from the hard-coded set of ON/OFF commands, which means if I configure
a thing and attach it to a switch there is no guarantee that it will respond as expected to receive commands. This PR changes the message factory
to require either bytes (from the RFXcom device) or all the details required to make a transmissable message, including the confguration of the
associated Thing. At the moment, this is only used by lighting4 and raw types, but I expect it will be useful for others in the future.

The hard-coded ON/OFF commands in lighting4 are based on experimentation with different devices, and are not at all consistent. This PR deprecates the
use of those so that in a future release, Lighting4 devices will only work when configured with the correct command ids up front. This will resolve
inconsistent behaviour where devices that have been discovered may work correctly, work only for ON or OFF but not both, have ON and OFF the wrong
way around, turn ON one physical device and OFF another, or any combination of those possibilities.

Signed-off-by: James Hewitt <[email protected]>
thinkingstone pushed a commit to thinkingstone/openhab-addons that referenced this pull request Nov 7, 2021
…ecated hard-coded guesses. (openhab#10940)

Currently, when a message is received the command will be determined only from the hard-coded set of ON/OFF commands, which means if I configure
a thing and attach it to a switch there is no guarantee that it will respond as expected to receive commands. This PR changes the message factory
to require either bytes (from the RFXcom device) or all the details required to make a transmissable message, including the confguration of the
associated Thing. At the moment, this is only used by lighting4 and raw types, but I expect it will be useful for others in the future.

The hard-coded ON/OFF commands in lighting4 are based on experimentation with different devices, and are not at all consistent. This PR deprecates the
use of those so that in a future release, Lighting4 devices will only work when configured with the correct command ids up front. This will resolve
inconsistent behaviour where devices that have been discovered may work correctly, work only for ON or OFF but not both, have ON and OFF the wrong
way around, turn ON one physical device and OFF another, or any combination of those possibilities.

Signed-off-by: James Hewitt <[email protected]>
marcfischerboschio pushed a commit to bosch-io/openhab-addons that referenced this pull request May 5, 2022
…ecated hard-coded guesses. (openhab#10940)

Currently, when a message is received the command will be determined only from the hard-coded set of ON/OFF commands, which means if I configure
a thing and attach it to a switch there is no guarantee that it will respond as expected to receive commands. This PR changes the message factory
to require either bytes (from the RFXcom device) or all the details required to make a transmissable message, including the confguration of the
associated Thing. At the moment, this is only used by lighting4 and raw types, but I expect it will be useful for others in the future.

The hard-coded ON/OFF commands in lighting4 are based on experimentation with different devices, and are not at all consistent. This PR deprecates the
use of those so that in a future release, Lighting4 devices will only work when configured with the correct command ids up front. This will resolve
inconsistent behaviour where devices that have been discovered may work correctly, work only for ON or OFF but not both, have ON and OFF the wrong
way around, turn ON one physical device and OFF another, or any combination of those possibilities.

Signed-off-by: James Hewitt <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants